package com.example.springboot.controller;


import com.example.springboot.pojo.Picture;
import com.example.springboot.service.PictureService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class PictureController {
    @Autowired
    PictureService pictureService;

    @CrossOrigin
    @RequestMapping("showMenuPictures")
    public List<Picture> findAllMenu(){
        List<Picture> pictures = pictureService.finaAllMenu();
        return pictures;
    }

    @CrossOrigin
    @RequestMapping("showDevlopePictures")
    public List<Picture> findAllDevlope(){
        List<Picture> pictures = pictureService.findAllDevlope();
        return pictures;
    }


}
